package cn.edu.hit.core.functional;

/**
 * Created by Wang on 2017/5/27.
 */
@FunctionalInterface
public interface BiFunction<T, U, R> extends java.util.function.BiFunction<T, U, R> {
    default java.util.function.Function<U, R> adaptFirst(T t) {
        return (u) -> this.apply(t, u);
    }

    default java.util.function.Function<T, R> adaptSecond(U u) {
        return (t) -> this.apply(t, u);
    }
}
